package com.cm.figure.dao;

import com.cm.figure.model.Pictures;
import com.cm.figure.model.User;
import org.apache.ibatis.annotations.Param;

public interface PicturesMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Pictures record);

    int insertSelective(Pictures record);

    Pictures selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Pictures record);

    int updateByPrimaryKeyWithBLOBs(Pictures record);

    int updateByPrimaryKey(Pictures record);

    // 通过userid查询图片
    Pictures[] selectPicturesByUserId(Long userid);

    Pictures selectPicturesAndUserByPictureId(Long id);

    Pictures[] selectPicturesPageing
            (@Param("userid") Long userid, @Param("currentPage") Long currentPage, @Param("pageSize") Long pgeSize);

    Integer selectPicturesTotalByUserId(Long userid);
}